package com.beans;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: H_tao_X
 * Date: 2022-11-18
 * Time: 15:41
 */
@Controller
public class BeanScopesController {

    // 将 User 注入
    @Autowired
    private User user1;

    public User getUser1() {
        User user = user1;
        System.out.println("Bean 原 name："  +  user.getName());
        user.setName("李四");
        return user;
    }
}
